        ORG 0000H
        LJMP MAIN
        ORG 000BH
        LJMP T0_INT_S
        ORG 0100H
MAIN:
        MOV SP,#60H
        MOV A,#0
        SETB P1.0
        MOV TMOD,#02H
        MOV TH0,#00H
        MOV TL0,#0F6H
        SETB TR0
        SETB ET0
        SETB EA
LOOP:   JMP LOOP

T0_INT_S:
        INC A
        CJNE A,#40,NEXT0
        SETB P1.0
        MOV A,#0
NEXT0:  
        CJNE A,#4,NEXT1
        CLR P1.0
NEXT1:

        RETI
        
        
        END
        

